<br /><br />
<div id="view-content">
    <p>View script for controller <b>User</b> and script/action name <b>index</b></p>
    <?php if (isset($this->usersAll)) {
        echo 'toto'; ?>
        <h2><?php echo $this->translate('view_user_modify') ?> : </h2>
        <table>
            <tr>
                <th><?php echo $this->translate('view_user_firstname') ?></th>
                <th><?php echo $this->translate('view_user_name') ?></th>
                <th><?php echo $this->translate('view_user_email') ?></th>
                <th><?php echo $this->translate('view_user_modify') ?></th>

            </tr>
            <?php
            $users = $this->usersAll;
            foreach ($users as $user) {
                //echo $user['nom'];
                if ($user['active'] == 1) {
                    echo '<tr>';
                } else {
                    echo '<tr style="text-decoration:line-through">';
                }
                echo '<td>' . $user['nom'] . '</td>';
                echo '<td>' . $user['prenom'] . '</td>';
                echo '<td>' . $user['email'] . '</td>';

                echo '<td><a href="' . $this->url(array('action' => 'edit', 'id' => $user['idUser'])) . '">Modifier</a> | <a href="' . $this->url(array('action' => 'del', 'id' => $user['idUser'])) . '" >Supprimer</a></td>';
                echo '</tr>';
            }
            ?>
        </table>
        <?php
    }
    ?>

    <?php if (isset($this->formUser)) { ?>
        <h2><?php echo $this->translate('view_user_add') ?> : </h2>
        <?php echo $this->formUser;
    } ?>
</div>